package com.zxy.ider.ehome.util;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
public class DownloadReceiver extends BroadcastReceiver {
	private static final String ACTION = "ebook.download.receiver";

	@Override
	public void onReceive(Context context, Intent intent) {
		if (intent.getAction().equals(ACTION)) {
			String result = intent.getStringExtra("info");
			Log.i("DownloadReceiver", result);
			if (!result.equals("[]")) {
				new DownloadThread(result, context).start();
			}
		}
	}

	private class DownloadThread extends Thread {
		private Context context;
		private String result;

		public DownloadThread(String result, Context context) {
			this.context = context;
			this.result = result;
		}
		@Override
		public void run() {
			super.run();
		}
	}
}
